<script setup>
import { mainStore } from "@/store/index";
// import { storeToRefs } from "pinia";

const store = mainStore();
const { phone, phoneHidden, phoneHidden2 } = storeToRefs(store);
const changePhone = () => {
  store.phone = String(Number(store.phone) + 1);
};
</script>
<template>
  <div>
    <h1>{{ store.phoneHidden }}</h1>
    <h1>{{ store.phoneHidden2 }}</h1>
    <div>{{ phone }}</div>
    <div>{{ phoneHidden }}</div>
    <div>{{ phoneHidden2 }}</div>
    <button @click="changePhone">改变phone</button>
  </div>
</template>

<style scoped></style>
